<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
        open(?url, ?target)：打开新网页

        close()：关闭网页
        
        print()：打印网页
        
        getSelection() ：获取选中文本
        <form action="">
            <input id="user"/>
        </form>
   <script>
    //location
    //设置即跳转
    //location.href = 'https://baidu.com'
    //获取当前页面的链接
    //location.href
    //navigator.userAgent
    onmouseup = function(){
        console.log(`你选择的文字是:${getSelection().toString()}`)
    }

    // var url = location.href
    // urlObj = new URL(url)
    // urlObj.searchParams.get('key')
    
    </script> 
</body>
</html>